<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}

<div class="x-nav">
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
		<i class="layui-icon" style="line-height:30px">ဂ</i>
	</a>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="javascript:history.go(-1);" title="返回">
		<i class="layui-icon" style="line-height:30px">&lt;</i>
	</a>
</div>
<div class="tablefilter">
    <div class="tablebutton">
        <a href="?m={$m}&c={$c}&a=add" class=""><i class="fa fa-plus"></i>新增</a>
    </div>
</div>
<div class="x-body">
	<table class="layui-table">
		<thead>
			<tr>
				<th>ID</th>
				<th>银行</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody id="datalist">
			{loop $data as $val}
			<tr>
				<td>{$val['id']}</td>
				<td>{$val['name']}</td>
				<td>{$val['status']}</td>
				<td>
					<a href="javascript:void(0);" ami="?m={$m}&c={$c}&a=del&id={$val['id']}" class="red a-ajax" amt="删除">删除</a>	| 
					{if $val['status']}
					<a href="javascript:void(0);" ami="?m={$m}&c={$c}&a=sta&flag=0&id={$val['id']}" class="a-ajax" amt="关闭">关闭</a>
					{else}
					<a href="javascript:void(0);" ami="?m={$m}&c={$c}&a=sta&flag=1&id={$val['id']}" class="a-ajax" amt="启用">启用</a>
					{/if}
				</td>
			</tr>
			{/loop}
		</tbody>
	</table>
	<div class="layui-clear">
		<div id="pages" class="layui-laypage right">{$multi}</div>		
	</div>
</div>

<script>
	$().ready(function(){
		$('.a-ajax').click(function(){
			if(window.confirm('你确定要' + $(this).attr('amt') + '吗？')){
				$.get($(this).attr('ami'),function(){
					location.reload();
				});
                return true;
             }else{
                return false;
            }
			
		})
	});
</script>

{template index/footer}